package com.googlecode.microanalyst.palette.edit;

import org.eclipse.draw2d.IFigure;
import org.eclipse.gef.AccessibleEditPart;
import org.eclipse.swt.accessibility.AccessibleControlEvent;
import org.eclipse.swt.accessibility.AccessibleEvent;

import com.googlecode.microanalyst.designer.edit.AnalysisEditPart;
import com.googlecode.microanalyst.palette.figure.SmoothFigure;
import com.googlecode.microanalyst.palette.i18n.PaletteMessages;
import com.googlecode.microanalyst.palette.model.Smooth;

public class SmoothEditPart extends AnalysisEditPart {

	public SmoothEditPart() {
	}

	@Override
	protected AccessibleEditPart createAccessible() {
		return new AccessibleGraphicalEditPart() {
			public void getValue(AccessibleControlEvent e) {
				e.result = "image";
			}
			public void getName(AccessibleEvent e) {
				e.result = PaletteMessages.Palette_Tool_Smooth;
			}
		};
	}

	protected Smooth getSmooth() {
		return (Smooth) getModel();
	}

	@Override
	protected IFigure createFigure() {
		SmoothFigure figure = new SmoothFigure();
		return figure;
	}

}
